#pragma once
#include "Windows.h"
#include <map>
#include "BaseObject.h"

class CIntent : public CBaseObject
{
public:
	int Release();
	int encoding(char * pszBuffer, const int nBufferSize);
	int decoding(const char * pBuffer, const int nBufferSize);
	void setAction(const char *pszAction);
	std::string & getAction();
	void putInt(const char *pszName, int value);
	void putFloat(const char *pszName, float value);
	void putDouble(const char *pszName, double value);
	void putBoolean(const char *pszName, bool value);
	void putString(const char *pszName, const char * value);
	void putObject(const char *pszName, CBaseObject *value);
	bool getInt(const char *pszName, int &value);
	bool getFloat(const char *pszName, float &value);
	bool getDouble(const char *pszName, double &value);
	bool getBoolean(const char *pszName, bool &value);
	bool getString(const char *pszName, std::string &value);
	bool getObject(const char *pszName, CBaseObject *& value);
	void ObjectsAddRef();
	void ObjectsRelease();

private:
	std::string m_strAction;
	std::map<std::string, int> m_mapInt;
	std::map<std::string, float> m_mapFloat;
	std::map<std::string, double> m_mapDouble;
	std::map<std::string, bool> m_mapBoolean;
	std::map<std::string, std::string> m_mapString;
	std::map<std::string, CBaseObject*> m_mapObject;

public:
	CIntent();
	~CIntent();
};

